package me.zhengjie.modules.finace_taxation.service;

import me.zhengjie.base.PageInfo;
import me.zhengjie.modules.finace_taxation.domain.FtOrder;
import me.zhengjie.modules.finace_taxation.domain.FtOrderSchedule;
import me.zhengjie.modules.finace_taxation.domain.FtOrderVO;
import me.zhengjie.modules.finace_taxation.service.dto.FtOrderDto;
import me.zhengjie.modules.finace_taxation.service.dto.FtOrderQueryParam;
import org.springframework.data.domain.Pageable;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
* @author 杨荣森
* @date 2021-06-30
*/
public interface FtOrderService {

    static final String CACHE_KEY = "ftOrder";

    /**
    * 查询数据分页
    * @param query 条件
    * @param pageable 分页参数
    * @return PageInfo<FtOrderDto>
    */
    PageInfo<FtOrderDto> queryAll(Map<String,Object> map, Pageable pageable);

    /**
    * 查询所有数据不分页
    * @param query 条件参数
    * @return List<FtOrderDto>
    */
    List<FtOrderDto> queryAll(FtOrderQueryParam query);

    FtOrder getById(String id);
    FtOrderDto findById(String id);

    /**
     * 插入一条新数据。
     */
    int insert(FtOrderDto resources);
    int updateById(FtOrderDto resources);
    int removeById(String id);
    int removeByIds(Set<String> ids);

    /*修改订单进度*/
    int updateOrderSchedule(FtOrderSchedule ftOrderSchedule);

    /*查询我的服务记录*/
    List<FtOrderVO> getOrdersByUserId(Map<String,Object> map);

    /*根据订单id查询订单的所有进度*/
    List<FtOrderSchedule> getOrderScheduls(String orderId);
    /**
    * 导出数据
    * @param all 待导出的数据
    * @param response /
    * @throws IOException /
    */
     void download(List<FtOrderDto> all, HttpServletResponse response) throws IOException;
}
